import java.util.List;
import java.util.LinkedList;

public class SintaxRule{
    private List<Production> productions;
    private String id;
    private String type;
    private int position;

    public SintaxRule (){
	this.productions=new LinkedList<Production>();
	this.id="";
	this.type="";
	this.position=-1;
    }
    
    public SintaxRule(String id){
	this.id=id;
	this.productions=new LinkedList<Production>();
	this.type="";
	this.position=-1;
    }
    
    public SintaxRule(String id, List<Production> productions){
	this.id=id;
	this.productions=productions;
	this.type="";
	this.position=-1;
    }
    
    public List<Production> getProduction(){
	return this.productions;
    }

    public String getId(){
	return this.id;
    }

    public void addProduction(Production p){
	this.productions.add(p);
    }

    public void setId(String id){
	this.id=id;
    }

    public void setType(String type){
	this.type=type;
    }
    
    public String getType(){
	return this.type;
    }

    public void setPosition(int position){
	this.position=position;
    }
    
    public int getPosition(){
	return this.position;
    }
}